import QtQuick 1.0

Item {
    id:container
        width: 500
        height: 500
        opacity: 1
        property alias idContent: id.text
        property alias passContent: pass.text
       signal connect(string idContent, string passContent)
        Image {
            id: image1
            x: 200
            y: 200
            width: 500
            height: 500
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
            source: "fond.jpg"

            BorderImage {
                id: border_image1
                x: 196
                y: 201
                width: 250
                height: 250
                opacity: 0
                NumberAnimation on opacity { from:0; to:0.8; duration: 1200}
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
                source: "menuCo.jpg"
            }

            TextArea{
                id:id
                text:""
                border.color: "#000000"
                x:200
                y:220
                NumberAnimation on opacity { from:0; to:1; duration: 1200}
                opacity: 0
            }

            Text{
                id: passTitle
                x:200
                y:240
                color: "#ffffff"
                NumberAnimation on opacity { from:0; to:1; duration: 1200}
                text: "Mot de passe:"
                styleColor: "#f7f2f2"
                opacity: 0
            }

            Text{
                id: idTitle
                x:200
                y:200
                color: "#ffffff"
                NumberAnimation on opacity { from:0; to:1; duration: 1200}
                text: "Identifiant:"
                opacity: 0
            }

            TextArea
            {
                id:pass
                x:200
                y:260
                NumberAnimation on opacity { from:0; to:1; duration: 1200}
                opacity: 0
                typeContenu: TextInput.Password
            }
        }



        Rectangle{
                id: validationButton
                x:200
                y:300
                NumberAnimation on opacity { from:0; to:1; duration: 1500}
                color: "#125fb7"
                opacity: 0
                width: 100
                height: 20
                MouseArea {
                        anchors.fill: parent
                        onClicked: {
                            container.connect(idContent, passContent);
                        }
                    }

                    Text {
                     id: buttonTitle
                     text: "Connexion"
                     anchors.horizontalCenter: parent.horizontalCenter
                     anchors.verticalCenter: parent.verticalCenter
                     horizontalAlignment: Text.AlignHCenter
                     opacity: 1
                     ColorAnimation on color { loops: Animation.Infinite; from:"black"; to:"white";  duration: 4000 }
                    }
        }



}
